#!/bin/bash
set -e -x 

cd $(dirname $0)/..
source $(dirname $0)/version.sh
export GO111MODULE=on

gofmt -l .

env GOOS=linux GOARCH=amd64

rm -rf bin && mkdir bin

go build -mod=vendor -ldflags "-X main.VERSION=$VERSION -linkmode external -extldflags -static" -o bin/$(basename `pwd`)

cp -rf conf ./bin/


